/*
 * Level.h
 *
 *  Created on: Nov 15, 2012
 *      Author: lucas
 */

#ifndef LEVEL_H_
#define LEVEL_H_
#include <list>
#include <string>
class PhysicsElement;
class BirdShootingLine;
class VisibleElement;
class Pig;
#include "Surface.h"
class Level {
private:
	std::list<VisibleElement*> elements;
	std::list<BirdShootingLine*> bslines;
	std::list<Pig*> pigs;
	Surface* surface;
	int numberOfPlayers;
	int levelTime;
	std::string backgroundPath;
	int width;
	int height;

public:
	Level();
	virtual ~Level();
	void addVisibleElement(VisibleElement* v);
	void removeVisibleElement(VisibleElement* v);
	void setSurface(Surface* s);
	void addBirdShootingLine(BirdShootingLine* bsl);
	void removeBirdShootingLine(BirdShootingLine* bsl);
	void setWidth(int width);
	void setHeight(int height);
	int getWidth() const;
	int getHeight() const;
	int getLevelTime();
	void addPig(Pig* p);
	void removePig(Pig* p);
	std::list<VisibleElement*> getVisibleElements();
	std::list<Pig*> getPigs();
	std::list<BirdShootingLine*> getBirdShootingLines();
	Surface* getSurface();
	void setNumberOfPlayers(int numberOfPlayers);
	int getNumberOfPlayers();
	void setBackground(std::string imagePath);
	void setLevelTime(int levelTime);
	std::string getBackground();
	void load(std::string filename);
	void save(std::string filename);
	std::string serialize();
	void deserialize(std::string s);

};

#endif /* LEVEL_H_ */
